/*******************************************************************************
*  file    : qbusydialog.cpp
*  created : 09.03.2012
*  author  : Slyshyk Oleksiy (alex312@meta.ua)
*******************************************************************************/

#include "qbusydialog.hpp"
#include <QBoxLayout>

QBusyDialog::QBusyDialog(QWidget *parent) :
    QDialog(parent)
{
    label_ = new QLabel(this);
    label_->setText(tr("Application busy..."));
    indicator_ = new QProgressIndicator(this);
    indicator_->setMinimumSize(50,50);
    indicator_->startAnimation();

    QHBoxLayout * layout = new QHBoxLayout();

    layout->addWidget(indicator_);
    layout->addWidget(label_);
    setLayout(layout);
    resize(300,80);
}

QString QBusyDialog::labelText()
{
    return label_->text();
}

void QBusyDialog::setLabelText(QString txt)
{
    label_->setText(txt);
}

